import request from '@/utils/request'

// 查询黑盒子mqtt配置列表
export function listMqttConfig(query) {
  return request({
    url: '/system/mqttConfig/list',
    method: 'get',
    params: query
  })
}

// 查询黑盒子mqtt配置详细
export function getMqttConfig(id) {
  return request({
    url: '/system/mqttConfig/' + id,
    method: 'get'
  })
}

// 新增黑盒子mqtt配置
export function addMqttConfig(data) {
  return request({
    url: '/system/mqttConfig',
    method: 'post',
    data: data
  })
}

// 修改黑盒子mqtt配置
export function updateMqttConfig(data) {
  return request({
    url: '/system/mqttConfig',
    method: 'put',
    data: data
  })
}

// 删除黑盒子mqtt配置
export function delMqttConfig(id) {
  return request({
    url: '/system/mqttConfig/' + id,
    method: 'delete'
  })
}

// 导出黑盒子mqtt配置
export function exportMqttConfig(query) {
  return request({
    url: '/system/mqttConfig/export',
    method: 'get',
    params: query
  })
}